﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace DataAccessLayer.Models
{
    [MetadataType(typeof(PropertyMetadata))]
    public partial class Property
    {

    }

    public class PropertyMetadata
    {
        [DisplayName("Property Value")]
        [Required(ErrorMessage = "Property Value is mandatory")]
        [RegularExpression("^[0-9]+$", ErrorMessage = "Property Value must be numeric characters")]
        public float Value { get; set; }

        [DisplayName("Minimum Property Lease Period")]
        public int MinPropLeasePeriod { get; set; }

        [DisplayName("Minimum Property Lease Unit")]
        [StringLength(1, ErrorMessage = "Minimum Property Lease Unit must be 1 character only")]
        public char MinPropLeaseUnit { get; set; }   
    }
}
